local skill = fk.CreateSkill{
  name = "tea__pingyue"
}
---@type ViewAsSkillSpec
local pingyue = {
  pattern = "slash",
  anim_type = "offensive",
  card_filter = Util.FalseFunc,
  view_as = function(self, player, cards)
    local card = Fk:cloneCard("slash")
    card.skillName = self.name
    return card
  end,
  enabled_at_play = function(self, player)
    return player:getAttackRange() > 0
  end,
  enabled_at_response = function(self, player, response)
    return player:getAttackRange() > 0 and not response
  end, 
  before_use = function(self, player, use)
    player.room:addPlayerMark(player, "@pingyue_attackrange-round", 1)
  end,
  after_use = function(self, player, use)
    if not player.dead and player:getAttackRange() > 0 then
      player.room:addPlayerMark(player, "pingyue_attackrange-round", 1)
    end
  end,
}
---@type AttackRangeSpec
local pingyue_attackrange = {
  correct_func = function (self, from, to)
    return 0 - from:getMark("pingyue_attackrange-round")
  end,
}
skill:addEffect("viewas", pingyue)
skill:addEffect("atkrange", pingyue_attackrange)
return skill